﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="QuotationForm.ascx.cs"
    Inherits="SalesManagement.Controls.Sales.Quotation" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:Window ID="winDetails" runat="server" Title="Chi tiết Phiếu báo giá" Frame="false"
    Hidden="true" CenterOnLoad="true" Width="500" AutoHeight="false" Height="400" Padding="5" Resizable="false"
    Closable="true" Layout="Fit" Icon="Group">
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" Split="true" Frame="false" Header="false"
            LabelWidth="80" AutoHeight="true" Border="false" MonitorValid="true" BodyStyle="background-color:transparent;"
            Layout="row" AutoScroll="true">
            <Items>
                <ext:TextField ID="txtBankName" runat="server" FieldLabel="Mã" AllowBlank="false"
                    AnchorHorizontal="100%" />
                <ext:ComboBox ID="ComboBox1" runat="server" FieldLabel="Khách hàng" AnchorHorizontal="100%"/>                    
                <ext:ComboBox ID="ComboBox2" runat="server" FieldLabel="Nhóm hàng" AnchorHorizontal="100%"/>
                <ext:ComboBox ID="ComboBox3" runat="server" FieldLabel="Chi nhánh" AnchorHorizontal="100%"/>
                <ext:DateField ID="DateField1" runat="server" FieldLabel="Ngày báo giá" AnchorHorizontal="100%"/>                
                <ext:GridPanel ID="grdMain" runat="server" StripeRows="true" TrackMouseOver="true"
                    AutoExpandColumn="BankName" Border="false" Region="Center" AutoHeight="false" Height="200">
                    <TopBar>
                        <ext:Toolbar ID="tbMain" runat="server">
                            <Items>
                                <ext:ToolbarSpacer />
                                <ext:ToolbarFill />
                                <ext:TextField ID="txtKeyword" runat="server" EmptyText="Tìm kiếm" />
                                <ext:ToolbarSpacer />
                                <ext:Button ID="btnFind" runat="server" Text="Tìm kiếm" Icon="Find">
                                </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Store>
                        <ext:Store ID="storeMain" runat="server">
                            <Reader>
                                <ext:JsonReader IDProperty="BankId">
                                    <Fields>
                                        <ext:RecordField Name="BankId" />
                                        <ext:RecordField Name="BankName" />
                                        <ext:RecordField Name="Description" />
                                        <ext:RecordField Name="IsDefault" />
                                        <ext:RecordField Name="IsActive" />
                                        <ext:RecordField Name="Deleted" />
                                        <ext:RecordField Name="CreatedDate" />
                                        <ext:RecordField Name="CreatedBy" />
                                        <ext:RecordField Name="UpdatedDate" />
                                        <ext:RecordField Name="UpdatedBy" />
                                    </Fields>
                                </ext:JsonReader>
                            </Reader>
                        </ext:Store>
                    </Store>
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:RowNumbererColumn />
                            <ext:Column ColumnID="BankName" DataIndex="BankName" Header="Mã sản phẩm" />
                            <ext:Column ColumnID="Description" DataIndex="Description" Header="Ghi chú"/>
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="paddingBar" StoreID="storeMain" runat="server" PageSize="50"
                            DisplayInfo="true" DisplayMsg="Đang xem dòng {0} đến {1} của {2}" EmptyMsg="Không có dữ liệu">
                        </ext:PagingToolbar>
                    </BottomBar>
                </ext:GridPanel>
            </Items>
        </ext:FormPanel>
    </Items>
    <Buttons>
        <ext:Button ID="btnSave" runat="server" Text="Lưu" Icon="Disk">
            <DirectEvents>
                <Click OnEvent="btnSave_Click" />
            </DirectEvents>
        </ext:Button>
        <ext:Button ID="btnCancel" runat="server" Text="Hủy bỏ" Icon="Cancel">
            <Listeners>
                <Click Handler="#{winDetails}.hide();" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>
